<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>用户管理</title>
	<link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css">
	<link href="./bootstrap/css/datetimepicker.css" rel="stylesheet">
	<link rel="stylesheet" href="./css/role-list.css" />
	<link rel="stylesheet" href="./css/global.css" />
	<link rel="stylesheet" href="./css/tree.css" />
	<link rel="stylesheet" href="./css/list-tree.css" />
	<script src="./js/jquery-1.11.3.min.js"></script>
	<script src="./bootstrap/js/bootstrap.min.js"></script>
	<script src="./bootstrap/js/moment.js"></script>
	<script src="./bootstrap/js/datetimepicker.js"></script>
	<script src="./js/global.js"></script>
	<script src="./js/treescroll.min.js"></script>
	<script src="./js/accordion.js"></script>
	<script src="./js/jquery.ztree.core.js"></script>
	<script src="./js/jquery.ztree.excheck.js"></script>
</head>

<body>
	<div class="container col-lg-12">
		<div class="navigation">
			<img class="nav-logo float-left" src="./img/logo.png" alt="logo">
			<div class="nav-text float-left">标准版</div>
			<div class="nav-drop dropdown float-right">
				<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
					aria-expanded="false">ADMIN <span class="caret"></span></a>
				<ul class="dropdown-menu dropdown-menu-right">
					<span class="dropdown-menu-top"></span>
					<li><a href="#">个人信息</a></li>
					<li><a href="#">修改密码</a></li>
				</ul>
			</div>
			<img class="nav-avatar float-right" src="./img/avatar.png" alt="头像">
		</div>
		<div id="sidebar" class="sidebar float-left">
			<ul id="accordion" class="accordion">
				<li class="a1"><a href="organization.html"> 组织机构管理</a></li>
				<li class="a2"><a href="user-management.html"> 用户管理</a></li>
				<li class="menu open">
					<div class="link"><i class="icon"></i>管理员管理 <i class="stretch"></i></div>
					<ul class="submenu">
						<li><a href="admin-list.html" style="background: none;padding-left: 44px;">管理员列表</a></li>
						<li class="active"><a href="role-list.html" style="background: none;padding-left: 44px;">管理员角色列表</a></li>
					</ul>
				</li>
				<li class="a4"><a href="user.html"> 个人中心</a></li>

			</ul>
			<ul class="m-hide icon-sidebar">
				<li><a href="organization.html" data-toggle="tooltipp" data-placement="right" title="组织机构管理"></a></li>
				<li><a href="user-management.html" data-toggle="tooltipp" data-placement="right" title="用户管理"></a></li>
				<li><a href="admin-list.html" data-toggle="tooltipp" data-placement="right" title="管理员管理"> </a></li>
				<li><a href="user.html" data-toggle="tooltipp" data-placement="right" title="个人中心"> </a></li>
			</ul>
			<i id="flod-btn"></i>
		</div>
		<div id="m-content" class="content float-right clearfloat">
			<ol class="breadcrumb" style="background: none">
				<li><a>管理员管理</a ></li>
				<li class="active">管理员角色列表</li>
			</ol>
			<div class="card-1 float-left  panel">
				<ul>
					<p>系统管理系统</p>
					<li>组织机构管理</li>
					<li>用户管理</li>
					<li>管理员管理</li>
					<li>个人中心</li>
				</ul>
			</div>
			<div class="card-2 float-right  panel">
				<div class="title">
					<ul>
						<li class="btn btn-xs float-left m-btn" data-toggle="modal" data-target="#myModal">角色添加</li>
						<li class="btn btn-xs float-left m-btn" data-toggle="modal" data-target="#myModal">修改</li>
						<li class="btn btn-default btn-xs float-left m-btn m-text-danger" data-toggle="modal"
							data-target="#myModalDelete">删除</li>

					</ul>
					<i class="float-right glyphicon glyphicon-refresh"></i>
					<div class="input-group float-right">
						<div class="input-group-btn">
							<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"
								aria-haspopup="true" aria-expanded="false">角色名称<span class="caret"></span></button>
							<ul class="dropdown-menu">
								<li><a href="#">任务1</a></li>
								<li><a href="#">任务2</a></li>
							</ul>
						</div>
						<input type="text" class="form-control input-sm" aria-label="...">
					</div>
				</div>
				<div class="table-cont">
					<div class="table-top">
						<table id="m-tab-top" class="table text-center">
							<thead>
								<tr>
									<td>角色编号</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
								<tr>
									<td>1341231234kjhakdf1343r</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="table-bottom">
						<table id="m-tab-bottom" class="table text-center">
							<thead>
								<tr>
									<td>角色名称</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
								<tr>
									<td>张三</td>
								</tr>
							</tbody>
						</table>
					</div>
					
				</div>
				<div class="paging">
					<span>共29条</span>
					<div class="dropup ">
						<button class="btn m-btn btn-xs btn-default dropdown-toggle" type="button" id="dropdownMenu1"
							data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
							20条/页
							<span class="caret"></span>
						</button>
						<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
							<li><a href="#">5条/页</a></li>
							<li><a href="#">10条/页</a></li>
						</ul>
					</div>
					<p><button class="btn m-btn btn-default btn-xs">首页</button></p>
					<nav aria-label="Page navigation ">
						<ul class="pagination">
							<li>
								<a href="#" aria-label="Previous">
									<span aria-hidden="true">&laquo;</span>
								</a>
							</li>
							<li><a href="#">1</a></li>
							<li><a href="#">2</a></li>
							<li><a href="#">3</a></li>
							<li><a href="#">4</a></li>
							<li><a href="#">5</a></li>
							<li>
								<a href="#" aria-label="Next">
									<span aria-hidden="true">&raquo;</span>
								</a>
							</li>
						</ul>
					</nav>
					<p>
						<button class="btn m-btn btn-default btn-xs">尾页</button>
					</p>
				</div>
			</div>
		</div>
		<!-- 删除提示 -->
		<div class="modal fade" tabindex="-1" id="myModalDelete" role="dialog">
			<div class="modal-dialog modal-center" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title">提示</h4>
					</div>
					<div class="modal-body">
						<div class="tip-content">
							<img src="img/tip.png" alt="" />
							<span>确定要删除该数据吗？</span>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn_b">确定</button>
						<button type="button" class="btn_q" data-dismiss="modal">
							取消
						</button>
					</div>
				</div>
			</div>
		</div>
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
								aria-hidden="true">&times;</span></button>
						<h4 class="modal-title" id="myModalLabel">角色添加</h4>
					</div>
					<div class="modal-body">
						<form class="modal-form">
							<ul class="ul_ul">
								<li class="left_li">角色名称：</li>
								<li class="right_li margin-l "><input class="input-padding" type="text" placeholder="asf5636"></li>
							</ul>
							<ul class="ul_ul">
								<li class="left_li">角色编号：</li>
								<li class="right_li margin-l "><input class="input-padding" disabled type="text" placeholder="1341231234kjhakdf1343r"></li>
							</ul>
							<ul class="ul_ul">
								<li class="left_li">角色授权：</li>
								<li class="right_li margin-l" style="width: 400px;height: 400px;border: 1px solid #ccc;overflow: scroll;">
									<ul id="treeDemo" class="ztree"></ul>
								</li>
							</ul>
						</form>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn_b">保存</button>
						<button type="button" class="btn_q" data-dismiss="modal">取消</button>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script>
		$(function () {
			// 列表点击选中的效果
			$('#m-tab-top>tbody>tr,#m-tab-bottom>tbody>tr').click(function () {
				var i = $(this).index();
				$($('#m-tab-top>tbody>tr')[i]).toggleClass('tr-active').siblings().removeClass('tr-active');
				$($('#m-tab-bottom>tbody>tr')[i]).toggleClass('tr-active').siblings().removeClass('tr-active');
			});
			$('#datetimepicker1,#datetimepicker2').datetimepicker({
				format: 'YYYY-MM-DD',
				locale: moment.locale('zh-cn'),
				defaultDate: "",
			});
			$('.a3 #adminBtn').click(function () {
				$('#adminBtn').removeClass().addClass('glyphicon glyphicon-menu-up')
				$('#admin').show()
			})
			$('#chooseInstitutions').click(function () {
				$('#institutions').show()
			})
			$('#chooseDepartment').click(function () {
				$('#department').show()
			})
			$('#institutionsItem li').click(function () {
				$('#institutions').hide()
				$('#chooseInstitutionsItem').show()
			})
			$('#departmentItem li').click(function () {
				$('#department').hide()
				$('#chooseDepartmentItem').show()
			})
			var setting = {
			check: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			}
		};

		var zNodes =[
			{ id:1, pId:0, name:"功能菜单",},
			{ id:11, pId:1, name:"摆渡任务",},
			{ id:111, pId:11, name:"首页"},
			{ id:12, pId:1, name:"文件传输任务",},
			{ id:121, pId:12, name:"任务新增"},
			{ id:122, pId:12, name:"执行摆渡"},
			{ id:123, pId:12, name:"再次刻录"},
			{ id:13, pId:2, name:"传输任务",},
			{ id:131, pId:13, name:"任务1"},
			{ id:132, pId:13, name:"任务2",},
			{ id:14, pId:3, name:"摆渡任务",},
			{ id:141, pId:14, name:"首页"},
			{ id:15, pId:4, name:"文件传输任务",},
			{ id:151, pId:15, name:"任务新增"},
			{ id:152, pId:15, name:"执行摆渡"},
			{ id:153, pId:15, name:"再次刻录"},
		];
		
		var code;
		
		function setCheck() {
			var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			py = $("#py").attr("checked")? "p":"",
			sy = $("#sy").attr("checked")? "s":"",
			pn = $("#pn").attr("checked")? "p":"",
			sn = $("#sn").attr("checked")? "s":"",
			type = { "Y":py + sy, "N":pn + sn};
			zTree.setting.check.chkboxType = type;
			showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
		}
		function showCode(str) {
			if (!code) code = $("#code");
			code.empty();
			code.append("<li>"+str+"</li>");
		}
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			setCheck();
			$("#py").bind("change", setCheck);
			$("#sy").bind("change", setCheck);
			$("#pn").bind("change", setCheck);
			$("#sn").bind("change", setCheck);
		});
		})
	</script>
</body>

</html>